<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <button>开始获取</button>
    <script>
        var but = document.querySelector('button');
        var arr = [99, 77, 88, 67, 89, 52, 827, 268, 2689];

        but.addEventListener('click', function() {
            var start = +new Date();
            var newArr = [];
            arr.forEach(function(value) {
                if (value == 88) {
                    newArr.push(value);
                }
            });
            console.log(newArr);
            var end = +new Date();
            console.log(end - start);
        });
    </script>
</body>

</html>